package com.example.room.entity;


import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * author: WangJunYan
 * package: com.example.wjy.entity
 * date: 2020/6/3
 * time: 19:10
 * 队伍的实体，其中的各个字段目前并无实际意义，可通过数据库的具体字段重新设置
 * 请求到网络的数据后会将通过room数据保存到本地数据库，然后获取，这个entity是room所需的组件之一
 */
@Entity
public class Team {

//    @PrimaryKey(autoGenerate = true)
//    private long id;
@PrimaryKey
@NonNull
private String teamId;

    @ColumnInfo
    private int teamState;


    @ColumnInfo(name = "team_kind")
    private String teamKind;

    @ColumnInfo(name = "team_name")
    private String teamName;


    @ColumnInfo(name = "avatar")
    private String teamAvatar;

//    @ColumnInfo(name = "team_direction")
//    private String direction;

    @ColumnInfo(name = "introduction")
    private String teamIntro;

    @ColumnInfo(name = "numOfAll")
    private int teamNumOfAll;

    @ColumnInfo(name = "numOfNow")
    private int teamNumOfNow;

    public Team(@NonNull String teamId, int teamState, String teamKind, String teamName, String teamAvatar, String teamIntro, int teamNumOfAll, int teamNumOfNow) {
        this.teamId = teamId;
        this.teamState = teamState;
        this.teamKind = teamKind;
        this.teamName = teamName;
        this.teamAvatar = teamAvatar;
        this.teamIntro = teamIntro;
        this.teamNumOfAll = teamNumOfAll;
        this.teamNumOfNow = teamNumOfNow;
    }

    @NonNull
    public String getTeamId() {
        return teamId;
    }

    public void setTeamId(@NonNull String teamId) {
        this.teamId = teamId;
    }

    public int getTeamState() {
        return teamState;
    }

    public void setTeamState(int teamState) {
        this.teamState = teamState;
    }

    public String getTeamKind() {
        return teamKind;
    }

    public void setTeamKind(String teamKind) {
        this.teamKind = teamKind;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getTeamAvatar() {
        return teamAvatar;
    }

    public void setTeamAvatar(String teamAvatar) {
        this.teamAvatar = teamAvatar;
    }

    public String getTeamIntro() {
        return teamIntro;
    }

    public void setTeamIntro(String teamIntro) {
        this.teamIntro = teamIntro;
    }

    public int getTeamNumOfAll() {
        return teamNumOfAll;
    }

    public void setTeamNumOfAll(int teamNumOfAll) {
        this.teamNumOfAll = teamNumOfAll;
    }

    public int getTeamNumOfNow() {
        return teamNumOfNow;
    }

    public void setTeamNumOfNow(int teamNumOfNow) {
        this.teamNumOfNow = teamNumOfNow;
    }
}
